OUT = lines

INCLUDE = -I/usr/include/
LIBDIR  = -L/usr/X11R6/lib -L../libcg/

COMPILERFLAGS = -Wall -g
CC = gcc
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm -lcg

SRC = main.c
OBJ = $(SRC:.c=.o)

lines: $(OBJ) ../libcg/libcg.a
	gcc $(LIBDIR) -o $(OUT) $(OBJ) $(LIBRARIES)
../libcg/libcg.a:
	make -C ../libcg
%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<
clean:
	make -C ../libcg clean
	rm -f $(OBJ) $(OUT)